﻿using System.Collections.Generic;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVCWeb.Models;
using System.Configuration;

namespace MVCWeb.Controllers
{
    
    public class BaseController : Controller
    {
        
        //protected HOACRMDataContext dc = new HOACRMDataContext();

        //DataLoadOptions options = new DataLoadOptions();
        //options.AssociateWith<Category>(cat=> cat.Products.Where<Product>(prod => !prod.Discontinued));
        //dc.LoadOptions = options;
        protected HOACRMDataContext dc = new HOACRMDataContext();
        
        protected override ViewResult View(string viewName, string masterName, object model)
        {
            return base.View(viewName, ConfigurationManager.AppSettings["MasterPageName"], model);
        }
    }
}
